Nonvolatile memory, such as flash memory, may include three types of blocks: data blocks, free blocks, and log blocks. Data blocks may hold user data and/or metadata. Free blocks may include empty blocks or blocks previously deleted. Log blocks may be reserved blocks to store temporary data. For example, when writing data to flash memory, log blocks may be used to temporarily hold data. Blocks may switch between the three types of categories.
Blocks of data may be divided into cells; however, cells may not be individually erasable. When data is written to a block, data in some cells may change while data in other cells may be replaced. Data that is not replaced may be transferred to log blocks. The block may then be erased and the cells with replaced data may be written. Thus, two partially filled blocks may now exist, the log block with the transferred data and the data block with the new data. Log blocks may be “merged” or consolidated to create more room for data storage. Thus, replacing data in cells of a block may involve multiple processes and use of multiple blocks.